package edu.berkeley.cs160.GroupC.songs;


import java.io.Serializable;
import java.util.Comparator;

public class Song implements Serializable {
	

	/**
	 * Eclipse auto generated version ID
	 */
	private static final long serialVersionUID = 7413611672823456L;
	
	private String artist;
	private String title;
	private String album;
	
	private String filePath;
	
	private boolean rated;
	private boolean inPlaylist;
	private int rating;

	private int bpm;

	
	
	public Song(String art, String alb, String ttl, String fpath, int bpm) {
		this.artist = art;
		this.album = alb;
		this.title = ttl;
		this.filePath = fpath;
		this.bpm = bpm;
		this.inPlaylist = false;
		this.rated = false;
	}
	
	public String getFilePath() {
		return this.filePath;
	}
	
	public String getTitle() {
		return this.title;
	}
	
	public String getArtist() {
		return this.artist;
	}
	
	public String getAlbum() {
		return this.album;
	}

	public boolean isRated() {
		return rated ;
	}

	public void setRating(int rating) {
		this.rating = rating;
		rated = true;
	}

	public int getRating() {
		return rating;
	}

	public boolean isInPlaylist(){
		return inPlaylist;
	}
	public void toggleInPlaylist() {
		if (inPlaylist) {
			inPlaylist = false;
		}
		else {
			inPlaylist = true;
		}
		
	}

	public int getBpm() {
		
		return bpm;
	}

}


